<template>
  <div>
    <div class="connect">
      <!-- 发件人地址 -->
      <div class="senderAddress">
        <div class="senderAddress_title">
          {{$t('Order_module.sender_address')}}
        </div>
        <el-form :disabled="order_info.orderStatus==1?true:false" :rules="rules" label-position='left' label-width="100px" ref="senderAddressObj" :inline="true" :model="senderAddressObj" class="demo-form-inline">
          <el-form-item :label="$t('Order_module.UserName')" prop="senderName" style="width: 30%;" >
            <!-- 姓名  -->
            <el-input class='' maxlength="20" show-word-limit v-model="senderAddressObj.senderName" :placeholder="$t('Order_module.UserName')"></el-input>
          </el-form-item>
          <el-form-item prop="senderProvince"  :label="$t('Order_module.economize')" style="width: 30%;" >
            <!-- 省 -->
            <el-input class='' maxlength="20" show-word-limit v-model="senderAddressObj.senderProvince" :placeholder="$t('Order_module.Select_Province')"></el-input>
          </el-form-item>
          <el-form-item prop="senderCity" :label="$t('Order_module.city')" style="width: 30%;" >
             <!-- 市 -->
            <el-input class='' maxlength="20" show-word-limit v-model="senderAddressObj.senderCity" :placeholder="$t('Order_module.Select_City')"></el-input>
          </el-form-item>
          <el-form-item prop="senderCounty" :label="$t('Order_module.distinguish')" style="width: 30%;" >
            <!-- 区 -->
            <el-input class='' maxlength="20" show-word-limit v-model="senderAddressObj.senderCounty" :placeholder="$t('Order_module.Selection_Area')"></el-input>
          </el-form-item>

         <el-form-item prop="senderTel" :label="$t('Order_module.cell_phone_num')" style="width: 30%;" >
           <!-- 手机号 -->
           <el-input class='' v-model="senderAddressObj.senderTel" maxlength="20"  @input="(e)=>{senderAddressObj.senderTel = e.replace(/[^0-9 . -]/g,'')}" :placeholder="$t('Order_module.Enter_cell_phone_number')"></el-input>
         </el-form-item>
         <el-form-item prop="senderZip" :label="$t('Order_module.Postal_Code')" style="width: 30%;" >
           <!-- 邮编 -->
           <el-input class='' maxlength="6" show-word-limit v-model="senderAddressObj.senderZip" :placeholder="$t('Order_module.Enter_postal_code')"></el-input>
         </el-form-item>
         <el-form-item prop="senderAddr"  :label="$t('Order_module.Address')" style="width: 100%;" >
           <!-- 详细地址 -->
           <el-input class='' maxlength="200" show-word-limit style="width: 40vw;" v-model="senderAddressObj.senderAddr" :placeholder="$t('Order_module.Enter_detailed_address')"></el-input>
         </el-form-item>
         <el-form-item :label="$t('Order_module.Address_Resolution')" style="width: 100%;" >
          <!-- 地址解析 -->
           <el-input style="width: 40vw"  type="textarea" :rows="5" maxlength="300" show-word-limit v-model="senderAddressObj.Address_Resolution" :placeholder="$t('Order_module.Enter_resolution_address')"></el-input>
         </el-form-item>
         <el-button @click="getAddress(senderAddressObj.Address_Resolution , '1')" type="primary">{{$t('Order_module.Resolve_Now')}}</el-button>
        </el-form>
      </div>

      <!-- 收件人地址 -->
      <div class="senderAddress" style="margin-top: 5vh;">
        <div class="senderAddress_title">
          {{$t('Order_module.Recipient_Address')}}
        </div>
        <el-form :disabled="order_info.orderStatus==1?true:false" ref="Recipient_AddressObj" label-position='left' label-width="100px"  :rules="rules2"  :inline="true" :model="Recipient_AddressObj" class="demo-form-inline">
          <el-form-item prop="consigneeName" :label="$t('Order_module.UserName')" style="width: 31%;" >
            <!-- 姓名  -->
            <el-input class='' show-word-limit maxlength="20" v-model="Recipient_AddressObj.consigneeName" :placeholder="$t('Order_module.enter_name')"></el-input>
          </el-form-item>


          <el-form-item prop="addressProvince" :label="$t('Order_module.economize')" style="width: 31%;" >
            <!-- 省 -->
            <el-input class='' show-word-limit maxlength="20" v-model="Recipient_AddressObj.addressProvince" :placeholder="$t('Order_module.Select_Province')"></el-input>
          </el-form-item>
          <el-form-item prop="addressCity"  :label="$t('Order_module.city')" style="width: 31%;" >
            <!-- 市 -->
            <el-input class='' show-word-limit maxlength="20" v-model="Recipient_AddressObj.addressCity" :placeholder="$t('Order_module.Select_City')"></el-input>
          </el-form-item>
          <el-form-item prop="addressCounty" :label="$t('Order_module.distinguish')" style="width: 31%;" >
            <!-- 区 -->
            <el-input class='' show-word-limit maxlength="20" v-model="Recipient_AddressObj.addressCounty" :placeholder="$t('Order_module.Selection_Area')"></el-input>
          </el-form-item>

         <el-form-item prop="consigneePhone" :label="$t('Order_module.cell_phone_num')" style="width: 31%;" >
           <!-- 手机号 -->
           <el-input class='' maxlength="11" show-word-limit @input="(e)=>{Recipient_AddressObj.consigneePhone = e.replace(/[^0-9 .]/g,'')}"  v-model="Recipient_AddressObj.consigneePhone" :placeholder="$t('Order_module.Enter_cell_phone_number')"></el-input>
         </el-form-item>
         <el-form-item prop="consigneeAddress" :label="$t('Order_module.Address')" style="width: 100%;" >
           <!-- 详细地址 -->
           <el-input class='' maxlength="200" show-word-limit style="width:40vw;" v-model="Recipient_AddressObj.consigneeAddress" :placeholder="$t('Order_module.Enter_detailed_address')"></el-input>
         </el-form-item>
         <el-form-item :label="$t('Order_module.Address_Resolution')" style="width: 100%;" >
          <!-- 地址解析 -->
           <el-input style="width:40vw;" type="textarea" :rows="5" maxlength="300" show-word-limit v-model="Recipient_AddressObj.Address_Resolution" :placeholder="$t('Order_module.Enter_resolution_address')"></el-input>
         </el-form-item>
          <el-button @click="getAddress(Recipient_AddressObj.Address_Resolution , '2')" type="primary">{{$t('Order_module.Resolve_Now')}}</el-button>
        </el-form>
      </div>
      <!-- 快件信息 -->
      <div class="senderAddress" style="margin-top: 5vh;">
        <div class="senderAddress_title">
          {{$t('Order_module.Express_information')}}
        </div>
        <el-form  :disabled="order_info.orderStatus==1?true:false":inline="true" label-position='left' ref="shopInfoObj" label-width="90px" :rules="rules3" :model="shopInfoObj" class="demo-form-inline">
          <div>
            <el-form-item  prop="packageNum"  :label="$t('Order_module.Number_of_packages')" style="width: 30%;" >
              <!-- 包裹件数  -->
              <el-input class='' maxlength="3" show-word-limit @input="(e)=>{shopInfoObj.packageNum= e.replace(/[^0-9]/g,'')}" v-model="shopInfoObj.packageNum" :placeholder="$t('Order_module.Number_of_packages')"></el-input>
            </el-form-item>
            <el-form-item  prop="orderNumber" :label="$t('Order_module.Order_No')" style="width: 30%;" >
              <!-- 订单号  -->
              <el-input class=''  maxlength="50" show-word-limit v-model="shopInfoObj.orderNumber" :placeholder="$t('Order_module.Order_No')"></el-input>
            </el-form-item>
            <el-form-item  prop="userWeight" :label="$t('public.Declared_weight')" style="width: 30%;" >
              <!-- 货物重量  -->
              <el-input class='' style="max-width: 200px;"  @blur="NumDotOnly_keyPress(shopInfoObj.userWeight)"  maxlength="10" show-word-limit @input="(e)=>{shopInfoObj.userWeight= $geShi(e)}" v-model="shopInfoObj.userWeight" :placeholder="$t('public.Declared_weight')">
                 <template slot="append">KG</template>
              </el-input>
            </el-form-item>
            <el-form-item  prop="volumeWeight" :label="$t('public.Package_volume')" style="width: 31%;" >
              <!-- 包裹体积  -->
              <el-input class='' style="max-width: 200px;"  maxlength="10" show-word-limit @input="(e)=>{shopInfoObj.volumeWeight= $geShi(e)}" v-model="shopInfoObj.volumeWeight" :placeholder="$t('public.Package_volume')">
                 <template slot="append">cm³</template>
              </el-input>
            </el-form-item>
            <!-- 批次号  -->
            <!-- <el-form-item v-if="piao_type==2"  prop="manifestNo" :label="$t('Order_module.Batch_number')" style="width: 30%;" >
              <el-input class='' v-model="shopInfoObj.manifestNo" :placeholder="$t('Order_module.Batch_number')">
              </el-input>
            </el-form-item> -->
            <el-form-item  prop="userId" :label="$t('Order_module.User')" style="width: 30%;" >
              <!-- 用户ID  -->
              <el-select v-model="shopInfoObj.userId" :placeholder="$t('Order_module.User') ">
                <el-option v-for="item in userList" :key="item.id" :label="item.userName" :value="item.id">
                </el-option>
              </el-select>
            </el-form-item>
            <div>
              <el-form-item  :label="$t('public.notes')" style="width: 100%;" >
                <!-- 订单备注  -->
                <el-input style="width: 40vw;"    maxlength="100" show-word-limit type="textarea" :rows="2" v-model="shopInfoObj.note" :placeholder="$t('public.notes')"></el-input>
              </el-form-item>
            </div>


          </div>
           <el-button @click="addShop()">{{$t('Order_module.increase')}}</el-button>
           <div>
             <el-form-item  prop="shoplist"  style="width: 100%;" >
               <!-- 商品信息  -->
               <el-table
                  :data="shopList"
                  border
                  style="width: 43vw;margin-top:2vh;">

                  <el-table-column min-width="120px" prop="name" :label="$t('Order_module.trade_name')" align="center" >
                    <template slot-scope="scope">
                        <el-input :disabled="order_info.orderStatus==1?true:false" maxlength="50" show-word-limit  v-model="scope.row.goodName" :placeholder="$t('Order_module.trade_name')"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column min-width="120px"  prop="number" :label="$t('public.number')" align="center" >
                    <template slot-scope="scope">
                        <el-input :disabled="order_info.orderStatus==1?true:false" type="number" v-model="scope.row.goodNumber" :placeholder="$t('public.number')"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column min-width="120px"  prop="price" :label="$t('public.unit_price')" align="center" >
                    <template slot-scope="scope">
                        <el-input :disabled="order_info.orderStatus==1?true:false" maxlength="11" show-word-limit @input="number($event , scope.$index , 'goodPrice')"  v-model="scope.row.goodPrice" :placeholder="$t('public.unit_price')"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    fixed="right"
                    :label="$t('public.operate')"
                    align="center"
                    >
                    <template slot-scope="scope">
                      <el-button :disabled="order_info.orderStatus==1?true:false" type="text" @click="del(scope.$index)" style="color: red;" size="small">{{$t('public.delete')}}</el-button>
                    </template>
                  </el-table-column>
                </el-table>
             </el-form-item>
           </div>


        </el-form>

      </div>
      <div style="display: flex; justify-content: flex-end;">
        <el-button :disabled="order_info.orderStatus==1?true:false" :loading="submitPiaoLoading" @click="submitPiao(piao_type)" type="primary">{{$t('public.determine')}}</el-button>
        <el-button @click="close">{{$t('public.cancellation')}}</el-button>
      </div>

    </div>

  </div>

</template>

<script>
import {
    order_list,
    order_search,
    order_searchUser,
    address_getDefault,
    order_info,
    order_save,
    order_update,
    orderWeight,
    order_tracking
  } from '@/api/wqzApi'
  import AddressParse,{AREA, Utils} from 'address-parse';
export default {
  watch: {
    piao_type: {
     immediate: true, // 很重要！！！
     handler (val) {

     }
    },

   },
  props: {
    id: {
      type: Number,
      default: 0
    },
    piao_type: null ,//1新增订单 2编辑已有订单

  },
  data() {
    return{
      check_id:null,
      submitPiaoLoading:false,
      rules: { //表单验证
          senderName: [{ required: true, message: this.$t('Order_module.enter_name'), trigger: 'blur' }],
          senderCounty: [{ required: true, message: this.$t('Order_module.Selection_Area'), trigger: 'blur' }],
          senderProvince: [{ required: true, message: this.$t('Order_module.Select_Province'), trigger: 'blur' }],
          senderCity: [{ required: true, message: this.$t('Order_module.Select_City'), trigger: 'blur' }],
          senderAddr: [{ required: true, message: this.$t('Order_module.Enter_detailed_address'), trigger: 'blur' }],
          senderTel: [{ required: true, message: this.$t('Order_module.cell_phone_num'), trigger: 'blur' }],
          senderZip: [{ required: true, message: this.$t('Order_module.Enter_postal_code'), trigger: 'blur' }],
        },
        rules2: { //表单验证
          consigneeName: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
          consigneePhone: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
          consigneeAddress: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
          addressProvince: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
          addressCity: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
          addressCounty: [{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
        },
        rules3:{ // 快件信息验证
            manifestNo:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            packageNum:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            orderNumber:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            userWeight:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            note:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            volumeWeight:[{ required: true, message: this.$t('public.Enter'), trigger: 'blur' }],
            userId:[{ required: true, message: this.$t('public.Please_select'), trigger: 'blur' }],
            shoplist:[{ required: true,  validator: (rule, value, callback)=>{
              var shoptrue = true
              var yan = true
              this.shopList.forEach((item , index )=>{
                if(item.goodName==null || item.goodName==''){
                  shoptrue = false
                }
                if(item.goodNumber==null || item.goodNumber==''){
                  shoptrue = false
                }
                if(item.goodPrice==null || item.goodPrice==''){
                  shoptrue = false
                }else{
                   let regex = /^\d+(\.\d{1,2})?$/;
                    yan = regex.test(item.goodPrice);

                }
              })
              if(!shoptrue){
                callback(new Error(this.$t('public.Please_complete_all_product_information')));
              }else{
                if(!yan){
                  callback(new Error(this.$t('public.Please_enter_the_correct_format')));
                }
                callback();
              }
            }, trigger: 'blur'  }]
        },
        senderAddressObj:{ // 发件人地址
          senderName:null,//姓名
          senderProvince:null,//省
          senderCity:null,//城市
          senderCounty:null,//区
          senderAddr:null,//详细地址
          cell_phone_num:null,//手机号
          senderTel:null,//电话号
          senderZip:null,//邮政编码
          Address_Resolution:null,//地址解析
        },
        Recipient_AddressObj:{
          // 收件人地址
           consigneeName:null,//收件人姓名
           consigneePhone:null,//收件人电话
           consigneeAddress:null,// 收件人地址（需包含省、市、区前三级地址）
           addressProvince:null,//收件人省份
           addressCity:null,//收件人城市
           addressCounty:null,//收件人区（县）
        },
        shopInfoObj:{
          //  快件信息
          manifestNo:null,//批次编号
          packageNum:null,//包裹数量
          orderNumber:null,//订单号
          userWeight:null,//客户重量
          note:null,//订单备注
          volumeWeight:null,//包裹体积
          userId:null,//用户ID
        },
        // piao_type:0,
        shopList:[
          {
            goodName:null ,// 物品名称
            goodNumber:null, //物品数量
            goodPrice:null //物品单价
          },
        ],
        userList : [], // 所属用户列表
        order_info:{orderStatus:0},//订单详情
    }
  },
  created() {

  },
  mounted() {
   this.getUserList()
   console.log(123131)
     this.$refs.senderAddressObj.resetFields();
     this.$refs.Recipient_AddressObj.resetFields();
     this.$refs.shopInfoObj.resetFields();

  },
  methods:{
     NumDotOnly_keyPress(ob) {
        // ob = ob.replace(/[^\d.]/g,""); // 清除"数字"和"."以外的字符
        // ob = ob.replace(/^\./g,""); // 验证第一个字符是数字而不是.
        // ob = ob.replace(/\.{2,}/g,"."); // 只保留第一个. 清除多余的
        // ob = ob.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        // ob = ob.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); // 只能输入两个小数
        // if (ob.indexOf(".") < 0 && ob !== "") {//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的数字
        //     ob = parseFloat(ob);
        // }
        this.shopInfoObj.userWeight = this.$geShi(ob)
    },
    getaddress_getDefault(){
      // 获取当前用户默认地址
      console.log('默认地址')
      address_getDefault({}).then(res=>{
        if(res.address.name){
          this.senderAddressObj = {
            senderName:res.address.name,//姓名
            senderProvince:res.address.province,//省
            senderCity:res.address.city,//城市
            senderCounty:res.address.county,//区
            senderAddr:res.address.address,//详细地址
            senderTel:res.address.phone,//电话号
            senderZip:res.address.zipCode,//邮政编码
            Address_Resolution:'',//地址解析
          }
        }
      })
    },
    close(){
      this.$emit('closepop' , false)
    },
    submitPiao(type){
      // 单票下单提交
      this.submitPiaoLoading = true
      var ok1 = false
      var ok2 = false
      var ok3 = false
      this.$refs.shopInfoObj.validate((valid) => {
        if (valid) {
          ok1 = true
        } else {
          console.log('error submit!!');
          return false;
        }
      });
      this.$refs.Recipient_AddressObj.validate((valid) => {
        if (valid) {
          ok2 = true
        } else {
          console.log('error submit!!');
          return false;
        }
      });
      this.$refs.senderAddressObj.validate((valid) => {
        if (valid) {
          ok3 = true
        } else {
          console.log('error submit!!');
          return false;
        }
      });

      if(ok1 && ok2 && ok3){

        var data = {
          ...this.Recipient_AddressObj ,
          ...this.shopInfoObj,
          ...this.senderAddressObj ,
        }
        data.logisticsNo = ''
        data.orderItems = this.shopList
        if(type == 1){
          // 添加订单
          order_save(data).then(res=>{
            this.$message({
              type:'success',
              message:this.$t('public.Operation_successful')
            })
            this.$emit('getList' , true)
            this.$emit('closepop' , false)
            this.submitPiaoLoading = false
          }).catch(err=>{
            this.submitPiaoLoading = false
          })
        }else{
          // 编辑订单

          data.id = this.order_id

          var parmae = {
            ...this.order_info,
            ...data
          }
          order_update(parmae).then(res=>{
            this.$message({
              type:'success',
              message:this.$t('public.Operation_successful')
            })
            this.submitPiaoLoading = false
            this.$emit('getList' , true)
            this.$emit('closepop' , false)
          }).catch(err=>{
            this.submitPiaoLoading = false
          })
        }

      }else{
        this.submitPiaoLoading = false
      }
    },
    piaoEdit(id , type){
      // 订单修改弹出层
      this.piao_type = type
      if(type==2){
        // 获取订单信息
        this.getOrderInfo(id)
      }else{
        this.getaddress_getDefault()
        this.order_info={
          orderStatus :  0
        }
        this.Recipient_AddressObj = {
        // 收件人地址
         consigneeName:null,//收件人姓名
         consigneePhone:null,//收件人电话
         consigneeAddress:null,// 收件人地址（需包含省、市、区前三级地址）
         addressProvince:null,//收件人省份
         addressCity:null,//收件人城市
         addressCounty:null,//收件人区（县）
      }
        this.shopInfoObj ={
        //  快件信息
        manifestNo:null,//批次编号
        packageNum:null,//包裹数量
        orderNumber:null,//订单号
        userWeight:null,//客户重量
        note:null,//订单备注
        volumeWeight:null,//包裹体积
        userId:null,//用户ID
      }
      this.shopList=[
        {
          goodName:null ,// 物品名称
          goodNumber:null, //物品数量
          goodPrice:null //物品单价
        },
      ]
        // this.piaoShow = !this.piaoShow
      }

    },
    getOrderInfo(id){
      console.log(id , '这个是获取详情的id')
      // 获取订单详情
      order_info({id:id}).then(res=>{
        this.order_info = res.order
        var data = res.order
        this.order_id = data.id
        this.senderAddressObj = { // 发件人地址
          senderName:data.senderName,//姓名
          senderProvince:data.senderProvince,//省
          senderCity:data.senderCity,//城市
          senderCounty:data.senderCounty,//区
          senderAddr:data.senderAddr,//详细地址
          cell_phone_num:data.cell_phone_num,//手机号
          senderTel:data.senderTel,//电话号
          senderZip:data.senderZip,//邮政编码
          Address_Resolution:'',//地址解析
        }
        this.Recipient_AddressObj = {
          // 收件人地址
           consigneeName:data.consigneeName,//收件人姓名
           consigneePhone:data.consigneePhone,//收件人电话
           consigneeAddress:data.consigneeAddress,// 收件人地址（需包含省、市、区前三级地址）
           addressProvince:data.addressProvince,//收件人省份
           addressCity:data.addressCity,//收件人城市
           addressCounty:data.addressCounty,//收件人区（县）
        }
        this.shopInfoObj ={
          //  快件信息
          manifestNo:data.manifestNo,//批次编号
          packageNum:data.packageNum,//包裹数量
          orderNumber:data.orderNumber,//订单号
          userWeight:data.userWeight,//客户重量
          note:data.note,//订单备注
          volumeWeight:data.volumeWeight,//包裹体积
          userId:data.userId,//用户ID
        }
        // 商品列表
        this.shopList = data.orderItems
        // this.piaoShow = !this.piaoShow

      })
    },
    getUserList(){
      // 筛选条件的userlist
      order_searchUser({}).then(res=>{
        this.userList = res.users
      })
    },
    // 删除商品
    del(index){
      console.log(index)
      if(this.shopList.length<=1){
        this.$message({
          type:'info',
          message:this.$t('public.Keep_at_least_one_item')
        })
        return
      }
      this.shopList.splice(index,1)
    },
    number(e,index,value){
      // this.shopList[index][value] =  e.replace(/[^0-9 .]/g,'')
      this.shopList[index][value] =  this.$geShi(e)
    },
    // 添加商品
    addShop(){
      this.shopList.push({goodName:null , goodNumber:null , goodPrice:null})
    },
    // 自动识别地区
    getAddress(text , type){
      console.log(text , type)
      if(text==''){
         this.$message(this.$t('Order_module.Content_cannot_be_empty'));
         return
      }
      // 张三 17615165885 辽宁省大连市沙河口区 金华中园 20号505
      var result = AddressParse.parse(text)[0];
      if(type==1){
         this.senderAddressObj.senderName=result.name;//姓名
         this.senderAddressObj.senderProvince=result.province;//省
         this.senderAddressObj.senderCity=result.city;//城市
         this.senderAddressObj.senderCounty=result.area;//区
         this.senderAddressObj.senderAddr=result.province+result.city+result.area+result.details;//详细地址
         this.senderAddressObj.senderTel=result.mobile;//手机号
      }else{
        // consigneeName:null,//收件人姓名
        // consigneePhone:null,//收件人电话
        // consigneeAddress:null,// 收件人地址（需包含省、市、区前三级地址）
        // addressProvince:null,//收件人省份
        // addressCity:null,//收件人城市
        // addressCounty:null,//收件人区（县）
        this.Recipient_AddressObj.consigneeName=result.name;//姓名
        this.Recipient_AddressObj.addressProvince=result.province;//省
        this.Recipient_AddressObj.addressCity=result.city;//城市
        this.Recipient_AddressObj.addressCounty=result.area;//区
        // this.Recipient_AddressObj.Address=result.details;//详细地址
        this.Recipient_AddressObj.consigneeAddress=result.province+result.city+result.area+result.details;//详细地址
        this.Recipient_AddressObj.consigneePhone=result.mobile;//手机号
      }
    },
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">

</style>
